package com.googlecode.recycled.drools;

import org.drools.runtime.rule.RuleContext;

/**
 * Implementor of this interface can execute business use case (i.e. block of business logic code).
 * Use cases are executed from the Drools consequences. The main idea behind this interface is to
 * allow Drools conseqences to delegate execution of the business logic to the Java code managed in
 * the organized way.
 *
 * @author Henryk Konsek
 */
public interface UseCase {

    /**
     * Fires use case (i.e. block of business logic code).
     *
     * @param ruleContext Drools context of the rule executing this use case.
     * @param facts       Facts passed to the use case.
     */
    void fire(RuleContext ruleContext, Object... facts);

}
